]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Connect to overlay-key signal from metacity-clutter to hide/show overlay
authorColin Walters <walters@src.gnome.org>
Fri, 5 Dec 2008 21:12:43 +0000 (21:12 +0000)
committerColin Walters <walters@src.gnome.org>
Fri, 5 Dec 2008 21:12:43 +0000 (21:12 +0000)
We want to effectively bind the "Windows key" on PC hardware to hide
and show the overlay.

svn path=/trunk/; revision=120

js/ui/main.js

index 1f390aa41833b8dc642fbaa261cac338a6c64206..aef8057fb600504f231a5419682040acdcf56292 100644 (file)
@@ -120,6 +120,15 @@ function start() {
 
     overlay = new Overlay.Overlay();
     wm = new WindowManager.WindowManager();
+    
+    let display = global.screen.get_display();
+    display.connect('overlay-key', function(display) {
+        if (overlay.visible) {
+            hide_overlay();
+        } else {
+            show_overlay();
+        }
+    });
 }
 
 // Used to go into a mode where all keyboard and mouse input goes to